<div class="wrap cfix">
  <div class="main-cont innerWrap">
    <div id="content">
    	<div class="strap multimedia" style="margin: 5px 0px 0px 0px;border: none;padding: 10px 0px 0px 0px;">
			<header class="cf" style="margin-bottom:0px;">
			<h2>Câu hỏi của bạn</h2>
			<ul class="nav">
				<li ><a href="<?php echo base_url(); ?>cau-hoi-moi-nhat.html">Câu hỏi mới nhất</a></li>
				<li ><a href="<?php echo base_url(); ?>cau-hoi-nhieu-tra-loi-nhat.html">Nhiều trả lời nhất</a></li>
				<li ><a href="<?php echo base_url(); ?>cau-hoi-hay-nhat.html">Câu hỏi hay nhất</a></li>
                <li ><a style="color:#f00;font-weight:bold;" href="<?php echo base_url(); ?>dang-nhap.html">Tài khoản</a></li>
			</ul>
			</header>
		</div>
        
      <section class="top-page">
      
        <div class="col last" style="width:250px">
          <div id="adspot-300x250-pos-1" class="ad" style="width:250px"> <img src="<?php echo base_url(); ?>public/images/adsense-300x250.gif" width="250" alt=""> </div>
        </div>
        <section id="Newswell">
          <div class="col strap personalised" style="width:160px;margin-right:17px">
            <section id="Timeout">
              <article class="article lifestyle clippingArea clippingAction"> <a href="#" title=""><img src="<?php echo base_url(); ?>public/images/th-495359715-140x93.jpg" width="140" height="93" alt=""></a>
                <div>
                  <h3><a href="#" title="">Too far? Rihanna bares (nearly) all on the red carpet</a></h3>
                  <div class="article-meta"> <em class="access">Contains:</em> <span class="icon poll" title="Article contains a poll">poll</span> <span class="icon gallery" title="Photo gallery">gallery</span> </div>
                </div>
              </article>
              <article class="article world clippingArea clippingAction"> <a href="#" title=""><img src="<?php echo base_url(); ?>public/images/th-sunbather-140x93.jpg" width="140" height="93" alt=""></a>
                <div>
                  <h3><a href="#" title="">Lucky escape: Plane narrowly misses beach sunbather</a></h3>
                  <div class="article-meta"> <em class="access">Contains:</em> <span class="icon video" title="This article contains a video.">This article contains a video.</span> </div>
                </div>
              </article>
              <article class="article entertainment clippingArea clippingAction"> <a href="#" title=""><img src="<?php echo base_url(); ?>public/images/Tyrion-thrones-th-140x93.jpg" width="140" height="93" alt=""></a>
                <div>
                  <h3><a href="#" title="">Game of Thrones shocker: how much can viewers stand?</a></h3>
                  <div class="article-meta"> <em class="access">Contains:</em> <a href="#"><span title="comments" class="icon comments">total comments</span>67</a> </div>
                </div>
              </article>
              <article class="article domain clippingArea clippingAction"> <a href="#" title=""><img src="<?php echo base_url(); ?>public/images/20110131943pio24144319--1-_320-140x93.jpg" width="140" height="93" alt=""></a>
                <div>
                  <h3><a href="#" title="">Swimming in it: Sydney mansion sells for $30 million</a></h3>
                  <div class="article-meta"> <em class="access">Contains:</em> <span class="icon gallery" title="Photo gallery">gallery</span> </div>
                </div>
              </article>
            </section>
          </div>
          <div class="col strap breaking-news" style="width:492px">
            <div class="homelink">♠ <a href="<?php echo base_url(); ?>">Trang chủ</a> » <a href="<?php echo base_url(); ?>cau-hoi-cua-ban.html" title="Câu hỏi của bạn">Câu hỏi của bạn</a></div>
	            <style type="text/css">
					 .tbl_regist{ width:492px; }
					 #ferorrs{width:96%;margin-bottom:5px;}
	 			</style>
            <script type="text/javascript">
		  $(document).on("click","#okie",function(){
			  $val = $("#questkey").val();$error = $("#ferorrs");
			  $category = $("#category").val();$captcha = $("#captcha").val();
			  $length = 50; $title = $("#qtitle").val();
			  //$error.html("<img src='<?php echo base_url(); ?>public/images/ajax-loader.gif' />");
			  if($title == "" || $val == "" || $captcha == ""){
				  $error.show().html("Vui lòng nhập đầy đủ thông tin").stop().fadeIn().delay(3000).fadeOut('slow');
				  return false;
			  }else{
				  if($category == 0){
					  $error.show().html("Vui lòng chọn chuên mục câu hỏi!").stop().fadeIn().delay(3000).fadeOut('slow');
				  	  return false;
				  }else{
					  if($val.length < $length){
						  $error.show().html("Câu hỏi của bạn quá ngắn! nhỏ nhất "+$length+" ký tự").stop().fadeIn().delay(3000).fadeOut('slow');
				  	  	  return false;
					  }else{
						  jQuery.post("<?php echo base_url(); ?>home/question/verify",{title:$title,value:$val,category:$category,captcha:$captcha},function(result){
							 if(result == "haanhdon"){ 
							 	 $("#qtitle").val("");$("#questkey").val("");$("#captcha").val("");
								 $error.show().html("<img src='<?php echo base_url(); ?>public/images/ajax-loader.gif' />");
								 setTimeout(function(){
							 		$error.show().html("<span style='color:green;font-weight:bold'>Câu hỏi của bạn đã được gửi, Ban quản trị sẽ kiểm duyệt trước khi hiển thị</span>");
							 $("#username").val("");$("#userpass").val("");$("#repass").val("");$("#fullname").val("");$("#userphone").val("");$("#useremail").val("");$("#captcha").val("");
						 		},3000);
								 
							 }else{
								 $error.show().html(result);
							 }
						  });
					  }
				  }
			  }
			  return false;
		  });
          </script>
          <div id="ferorrs"></div>
            <form action="javascript:void(0)" method="post">
              <table cellpadding="4" cellspacing="0" class="tbl_regist">
                <tr class="title_table">
                  <td colspan="2" class="fieldheader"><img src="<?php echo base_url(); ?>public/images/icons_questions.png"/>Bắt đầu câu hỏi của bạn</td>
                </tr>
                <tr>
                  <td width="200px">Tiêu đề <b style="color: #ff0000;">*</b> <span id="check_user"></span></td>
                  <td><input type="text" id="qtitle" class="boxInput" size="20"   value=""/></td>
                </tr>
                <tr>
                  <td>Câu hỏi của bạn <b style="color: #ff0000;">*</b> <span class="explain"></span></td>
                  <td><textarea name="questkey" style="padding:3px;width: 304px;box-shadow: #f4f4f4 0 4px 2px inset;border: solid 1px #ccc;" id="questkey" cols="37" rows="8"><?php if(isset($_GET['val'])){ echo $_GET['val']; }else{ echo $questkey;} ?>
</textarea></td>
                </tr>
                <tr>
                  <td>Chọn chuyên mục <b style="color: #ff0000;">*</b> <span class="explain"></span></td>
                  <td><select id="category">
                      <option value="0">- Chọn -</option>
                      <?php
                    if(isset($listcate)){ foreach($listcate as $items){
                        echo "<option value='".$items['cid']."'>".$items['names']."</option>";
                    }}
                    ?>
                    </select></td>
                </tr>
                <tr>
                  <td width="200px">Mã xác nhận</td>
                  <td><img src="<?php echo base_url()."home/ran_image"; ?>"/></td>
                </tr>
                <tr>
                  <td width="200px">Nhập mã xác nhận <b style="color: #ff0000;">*</b> <span id="check_user"></span></td>
                  <td><input type="text" id="captcha" class="boxInput" size="20"   value=""/></td>
                </tr>
                <tr>
                  <td width="200px"></td>
                  <td><input type="submit" id="okie" class="boxInput bachnx_questions" size="20" value="Gửi ngay" /></td>
                </tr>
              </table>
            </form>
          </div>
        </section>
        <div class="col last strap" style="width:250px">
          <div class="ad" style="width:250px"> <img src="<?php echo base_url(); ?>public/images/adsense-300x250.gif" width="250" alt=""> </div>
        </div>
      </section>
    </div>
  </div>
</div>
